import RecallList from "../GMDBase/RecallList"

export default class _WechatDelegate
{

    //观看视频，结果回调
    public static onGetCodeSuccess(code:string)
    {
        console.log("WechatJS onGetCodeSuccess:"+ code)
        
    
        this.onLoginCallbaks.CallSuccess("success",{
            code:code
        })
    }

    //登录失败结果回调
    public static onLoginFail(r:number)
    {
        console.log("WechatJS onLoginFail:"+r)

    
        this.onLoginCallbaks.CallSuccess("fail",{
            errCode:r
        })
    }
    
    static get onLoginCallbaks():RecallList
    {
        if(!this._onLoginCallbaks) this._onLoginCallbaks = new RecallList();
        return this._onLoginCallbaks;
    }

    static _onLoginCallbaks:RecallList
}
window["WechatDelegate"] = _WechatDelegate 